<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <title>Document</title>
    <style>
        .box {
            background-color: red;
            font-size: 40px;
        }
        
        .newf {
            background-color: aqua;
        }

        div {
            width: 300px;
            height: 300px;
            background-color: teal;
        }
    </style>
</head>
<body>

    <div class="box newf">hh</div>

<script>
    const box = document.querySelector("div")

    // box.classList.add("newf")

    box.classList.toggle("newf")
    
</script>
    
</body>
</html>